#pragma once

#define D_SOCKET_CONN_MAX (10)

typedef void* SocketConnectionHandle;
typedef void(*SocketConnectionReceiveCallback)(char* , int );

typedef void *SubConnectionHandle;
typedef void(*SubConnectionCallback)(SubConnectionHandle);

SocketConnectionHandle SocketServer_Create();
int SocketServer_Connect(SocketConnectionHandle handle, char* ipAddress, int port, SubConnectionCallback onConn);
int SocketServer_Close(SocketConnectionHandle *handle);
int SubConn_RcvData(SubConnectionHandle handle, char *buffer, int *length);
int SubConn_SendData(SubConnectionHandle handle, char *buffer, int length);
int SubConn_GetNo(SubConnectionHandle handle);

